<template>
  <div class="box">
    {{ num }}
    <son :num="num - 1" v-if="num > 0" />
  </div>
</template>

<script>
export default {
  name: "son",
  props: ["num"],
};
</script>

<style lang="less" scoped>
.box {
  margin: 3px;
  padding: 3px;
  border: 1px solid pink;
}
</style>